package com.tian.manage.demos.web;

import com.tian.common.result.BaseResult;
import com.tian.common.result.Result;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.ArrayList;
import java.util.List;

/**
 * @author zhumengping
 * @title: UserController
 * @projectName zhump-cloud
 * @date 2023/8/1 16:43
 */
@RestController
@RequestMapping(value = "${system.apiPrefix}/manageUser")
public class UserController {



    @PostMapping(value = "/getUserList")
    public BaseResult<List<User>> getUserList(){

        List<User> list = new ArrayList<>();
        User user = new User();
        user.setAge(18);
        user.setName("用户1");
        list.add(user);

        User user2 = new User();
        user2.setAge(19);
        user2.setName("用户2");
        list.add(user2);

        list.stream().map(User::getAge);

        return Result.ok(list);



    }
}
